package com.gitee.wsl.db.dsl.operation

import kotlin.jvm.JvmOverloads


class QueryOperation {
    var page: Page? = null
    var orders = mutableListOf<Order>()

    fun page(pageNum: Int, pageLines: Int): QueryOperation {
        this.page = Page(pageNum, pageLines)
        return this
    }

    @JvmOverloads
    fun order(fieldName: String?, asc: Boolean = false): QueryOperation {
        orders.add(Order(fieldName!!, asc))
        return this
    }
}
